CREATE OR REPLACE PACKAGE "kesplus_platform"."date_util" AUTHID CURRENT_USER AS
    /**
     * @Description 获得时间差秒数
     * @param begin_time 开始时间
     * @param end_time 结束时间
     * @Return int
     */
    function getSeconds(begin_time timestamp without time zone, end_time timestamp without time zone) returns int;
    /**
     * @Description 获得时间差秒数
     * @param AFTER_TIME 结束时间
     * @param BEFORE_TIME 开始时间
     * @Return int
     */
    FUNCTION DIFF_SECOND(AFTER_TIME DATE,BEFORE_TIME DATE) RETURN INT;
    /**
     * @Description 获得时间差分钟数
     * @param AFTER_TIME 结束时间
     * @param BEFORE_TIME 开始时间
     * @Return int
     */
    FUNCTION DIFF_MINUTE(AFTER_TIME DATE,BEFORE_TIME DATE) RETURN INT;
    /**
     * @Description 获得时间差小时数
     * @param AFTER_TIME 结束时间
     * @param BEFORE_TIME 开始时间
     * @Return int
     */
    FUNCTION DIFF_HOUR(AFTER_TIME DATE,BEFORE_TIME DATE) RETURN INT;
    /**
     * @Description 获得时间差天数
     * @param AFTER_TIME 结束时间
     * @param BEFORE_TIME 开始时间
     * @Return int
     */
    FUNCTION DIFF_DAY(AFTER_TIME DATE,BEFORE_TIME DATE) RETURN INT;
    /**
     * @Description 获得时间差动态单位（天、时、分、秒自动进位）
     * @param AFTER_TIME 结束时间
     * @param BEFORE_TIME 开始时间
     * @Return int
     */
    FUNCTION DIFF_TIME(AFTER_TIME DATE,BEFORE_TIME DATE) RETURN TEXT;
    /**
     * @Description 获得时间差INTERVAL时间格式(1 day 12:30:22)
     * @param AFTER_TIME 结束时间
     * @param BEFORE_TIME 开始时间
     * @Return TEXT
     */
    FUNCTION DIFF_INTERVAL(AFTER_TIME DATE,BEFORE_TIME DATE) RETURN TEXT;
    /**
     * @Description 获得时间差INTERVAL时间格式带单位(1 day 12 hour 30 minute 22 second)
     * @param AFTER_TIME 结束时间
     * @param BEFORE_TIME 开始时间
     * @Return TEXT
     */
    FUNCTION DIFF_INTERVAL_UNIT(AFTER_TIME DATE,BEFORE_TIME DATE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